All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.util.StringHandle

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.util.QTHandleRef
                   |
                   +----quicktime.util.StringHandle

public class StringHandle
extends QTHandleRef
implements QuickTimeLib
This class is used to store 7bit ASCII value strings


Variable Index

 o kCStringFormat
 o kPStringFormat

Constructor Index

 o StringHandle(String, int)
Construct a handle from a java String.

Method Index

 o fromCodecName(CodecName)
Get the name of the compressor component.
 o fromJavaString(String)
Sets the String found in the handle to the java.lang.String characters.
 o getFormat()
Returns true if the string stored in the handle is a C String, or false if it is a PString
 o getStringLength()
Returns the length of the String that is stored in the StringHandle.
 o toJavaString()
Returns the String found in the Handle as a java.lang.String
 o toString()
Returns the String found in the Handle as a java.lang.String

Variables

 o kCStringFormat
 public static final int kCStringFormat
 o kPStringFormat
 public static final int kPStringFormat

Constructors

 o StringHandle
 public StringHandle(String str,
                     int format) throws QTException
Construct a handle from a java String. The string will only be stored as 7bit ASCII values - the full unicode specification of the Java String is lost in this conversion. You must supply information about how this String is to be formatted.

Parameters:
str - the Java string to store in the handle
format - if kCStringFormat the string is formatted as a C string with a '\0' termination if kPStringFormat then the string is formatted as a PString with a count byte inserted at the start.

Methods

 o fromCodecName
 public static StringHandle fromCodecName(CodecName cn)
Get the name of the compressor component.

Returns:
the name.
See Also:
getName
 o getStringLength
 public int getStringLength()
Returns the length of the String that is stored in the StringHandle.

Returns:
the number of characters in this String
 o getFormat
 public int getFormat()
Returns true if the string stored in the handle is a C String, or false if it is a PString

 o toJavaString
 public String toJavaString() throws UtilException
Returns the String found in the Handle as a java.lang.String

Returns:
java.lang.String representation
 o fromJavaString
 public void fromJavaString(String str) throws UtilException
Sets the String found in the handle to the java.lang.String characters. This will NOT grow the handle so that handle must be big enough to hold the new string

Parameters:
str - the characters that the StringHandle will be set to
 o toString
 public String toString()
Returns the String found in the Handle as a java.lang.String

Returns:
java.lang.String representation
Overrides:
toString in class QTHandleRef

All Packages  Class Hierarchy  This Package  Previous  Next  Index